#ifndef __FUNCTION_C_H__

#define __FUNCTION_C_H__

#define MAXSIZE 1000
#define MAX_NUM 100

enum{
    CMD_TYPE_EXIT,
    CMD_TYPE_CD,
    CMD_TYPE_LS,
    CMD_TYPE_LL,
    CMD_TYPE_PWD,
    CMD_TYPE_GETSFILE,
    CMD_TYPE_PUTSFILE,
    CMD_TYPE_MV,
    CMD_TYPE_CP,
    CMD_TYPE_RM,
    CMD_TYPE_RMDIR,
    CMD_TYPE_MKDIR,
};

void set_nonblock(int fd);
int create_connect(int port,const char* ip);
int create_epoll(int fd);
void add_rw_epoll(int efd,int fd);
void add_r_epoll(int efd,int fd);
void del_epoll(int efd,int fd);
int cd_s(int peerfd,const char* pthname);
int ls_s(int peerfd,const char* pthname);
int ll_s(int peerfd,const char* pthname);
int pwd_s(int peerfd);
int getsfile_s(int peerfd,char* pthname);
int putsfile_s(int peerfd);
int mv_s(char* pthname1,char* pthname2);
int cp_s(char* pthname1,char* pthname2);
int mkdir_s(const char* pthname);
int rmdir_s(const char* pthname);
int rm_s(const char* pthname);

#endif

